package com.zhaopin.springboot.web;

import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.resource.HttpResource;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Administrator
 * @create 2021-04-22 16:47
 */
@RestController
public class UserController {

    @RequestMapping("/user/cash")
    public String getUserCount() {
        return "可用余额为： 900元";
    }

    @RequestMapping("/user/verify")
    public String verifyUserInfo(HttpServletRequest httpServletRequest){
        httpServletRequest.getSession().setAttribute("code",0);
        return "用户实名认证成功";
    }

    @RequestMapping("/user/error")
    public String error(){
        return "用户没有权限登陆系统";
    }
}
